//
//  BCProjectDetailRequestModel.m
//  GSBlockChain
//
//  Created by guoshikeji_a on 2018/12/4.
//  Copyright © 2018 guoshikeji. All rights reserved.
//

#import "BCProjectDetailRequestModel.h"

@implementation BCProjectDetailRequestModel

- (HttpRequestMethod)requestMethod {
    return GET;
}
- (NSString *)relativelyUrl {
    if (self.isPreBuy) {
        return V1_Flow_Info_Ordering_(self.projectId);
    }else {
        return V1_Flow_Info_(self.projectId);
    }
}

- (BOOL)success:(NSURLSessionDataTask *)task data:(id)obj {
    BOOL success = [super success:task data:obj];
    if (success) {
        BCProjectDetailResponse *resp = [BCProjectDetailResponse yy_modelWithJSON:obj];
        if (self.requestSuccessed) {
            self.requestSuccessed(resp, nil);
        }
    }
    return success;
}

@end
